home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / Samples / Moofwars 1.02 / MoofWars Encoder / •Headers / Color Search Procs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-24  |  1.8 KB  |  58 lines  |  [TEXT/CWIE]

  1. /*************************************************************************************
  2. #
  3. #    Color Search Procs.h
  4. #    
  5. #    This file defines a number of commonly used color search procs.  For the encoder,
  6. #   we only use one of the procs, which returns white if the color of a pixel is within
  7. #   a certain delta of a key color, and returns black for all other cases.  We can use
  8. #   this to quickly create masks of an image.
  9. #   
  10. #
  11. #    Author: Timothy Carroll
  12. #    Apple Developer Technical Support
  13. #    timc@apple.com
  14. #
  15. #    Modification History: 
  16. #
  17. #    8/15/96        TMC     Initial Release
  18. #
  19. #    2/24/97        TMC        Now explicitly include Main.h
  20. #
  21. #    Copyright © 1996 Apple Computer, Inc., All Rights Reserved
  22. #
  23. #
  24. #    You may incorporate this sample code into your applications without
  25. #    restriction, though the sample code has been provided "AS IS" and the
  26. #    responsibility for its operation is 100% yours.  However, what you are
  27. #    not permitted to do is to redistribute the source as "DSC Sample Code"
  28. #    after having made changes. If you're going to re-distribute the source,
  29. #    we require that you make it clear in the source that the code was
  30. #    descended from Apple Sample Code, but that you've made changes.
  31. #
  32. *************************************************************************************/
  33.  
  34.  
  35. #ifndef _COLORSEARCHPROC_
  36. #define _COLORSEARCHPROC_
  37.  
  38. #pragma once
  39.  
  40. #include "Main.h"
  41. #include <QuickDraw.h>
  42. // We included main to get our black and white color constants.  If you don't have main.h,
  43. // uncomment these two lines and remove the include.
  44.  
  45. //const RGBColor kWhite = {0xFFFF, 0xFFFF, 0xFFFF};
  46. //const RGBColor kBlack = {0x0000, 0x0000, 0x0000};
  47.  
  48. extern ColorSearchUPP MaskSearchProcUPP;
  49. extern ColorSearchUPP LightenSearchProcUPP;
  50. extern ColorSearchUPP DarkenSearchProcUPP;
  51.  
  52. extern RGBColor gMaskColor;
  53. extern SInt32    gSearchDelta;
  54.  
  55.  
  56. #endif // _COLORSEARCHPROC_
  57.  
  58.